#include <stdio.h>

int main() {
  long n, m, a;
  scanf("%ld%ld%ld", &n, &m, &a);
  long long nn = n % a == 0 ? n / a : n / a + 1;
  long long mm = m % a == 0 ? m / a : m / a + 1;
  long long ans = nn * mm;
  printf("%lld\n", nn * mm);
}
